public class TestMethodMemory {
    public static void main(String[] args) {
        int[] arr={44,5,6,6,78};
        reverse(arr);
        for (int i=0;i<arr.length;i++)
        {
            System.out.print(arr[i]+" ");
        }

    }
    //实现数组的反转
    public static void reverse(int[] arr) {
        for(int left=0,reight = arr.length-1;left<reight;left++,reight--)
        {
            int temp = arr[left];
            arr[left] = arr[reight];
            arr[reight] = temp;
        }
    }
}
